class SystemUserNameModel {
  String? type;
  bool? success;
  SystemUserNameModelData? data;
  String? index;

  SystemUserNameModel({this.type, this.success, this.data, this.index});

  SystemUserNameModel.fromJson(Map json) {
    type = json['type'];
    success = json['success'];
    data = json['data'] != null
        ? SystemUserNameModelData.fromJson(json['data'])
        : null;
    index = json['index'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = {};
    data['type'] = type;
    data['success'] = success;
    if (this.data != null) {
      data['data'] = this.data!.toJson();
    }
    data['index'] = index;
    return data;
  }
}

class SystemUserNameModelData {
  String? name;
  String? userName;
  int? userId;
  Address? address;

  SystemUserNameModelData(
      {this.name, this.userName, this.userId, this.address});

  SystemUserNameModelData.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    userName = json['user_name'];
    userId = json['user_id'];
    address =
        json['address'] != null ? Address.fromJson(json['address']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = {};
    data['name'] = name;
    data['user_name'] = userName;
    data['user_id'] = userId;
    if (address != null) {
      data['address'] = address!.toJson();
    }
    return data;
  }
}

class Address {
  int? radius;
  double? lng;
  double? lat;
  String? title;

  Address({this.radius, this.lng, this.lat, this.title});

  Address.fromJson(Map<String, dynamic> json) {
    radius = json['radius'];
    lng = json['lng'];
    lat = json['lat'];
    title = json['title'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = {};
    data['radius'] = radius;
    data['lng'] = lng;
    data['lat'] = lat;
    data['title'] = title;
    return data;
  }
}
